package cn.hp;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration //配置类
public class MyWebMvcConfig implements WebMvcConfigurer{

	//重写addResourceHandLers
	@Override
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		//设置访问路径的匹配规则
		registry.addResourceHandler("/test/**","/test1/**")
		//当路径匹配成功后制定去哪个目录下找相应的文件
		.addResourceLocations("classpath:/test/","classpath:/static/");	
	
	}
	
	
}
